# 修改密码
sudo -s
echo root:lntu@2023 | chpasswd
# 修改网卡配置
cat <<EOF >>/etc/sysconfig/network-scripts/ifcfg-ens7
BOOTPROTO=static
IPADDR=10.11.27.253
NETMASK=255.255.255.0
GATEWAY=10.11.27.254
DNS1=180.184.1.1
EOF
# 重启网络服务
systemctl restart network

# 安装依赖软件
dnf -y install openeuler-lsb tar ntp bash-completion vim fish \
    network-scripts openblas-devel kernel-devel \
    gcc make dkms gcc-c++ libglvnd-devel pciutils
# 设置ntp服务器 重启
echo 'server ntp.aliyun.com' >>/etc/ntp.conf
systemctl enable --now ntpd
# 设置时区 语言环境
timedatectl set-timezone Asia/Shanghai
localectl set-locale LANG=zh_CN.UTF-8
source /etc/locale.conf
timedatectl set-ntp yes
# python3-pipx
dnf install -y python3-pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# git-lfs docker-compose
dnf install -y wget
wget -O git-lfs-3.1.2-1.x86_64.rpm https://packagecloud.io/github/git-lfs/packages/fedora/35/git-lfs-3.1.2-1.x86_64.rpm/download.rpm
sudo yum install git-lfs-3.1.2-1.x86_64.rpm -y

# 屏蔽系统自带驱动
cat <<EOF >>/usr/lib/modprobe.d/dist-blacklist.conf
blacklist nouveau
options nouveau modeset=0
EOF
# 重建内核
# 重建内核
rm -rf /boot/initramfs-$(uname -r).img
dracut /boot/initramfs-$(uname -r).img $(uname -r)
reboot
